package cz.muni.fi.pa165.api.dto;

/**
 * Class representing a transfer object for Mushroom entity
 *
 * @author Matej Cimbora
 */
public class MushroomDTO {

    private Long id;
    private String name;
    private MushroomType type;
    private Months occurenceFrom;
    private Months occurenceTo;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public MushroomType getType() {
        return type;
    }

    public void setType(MushroomType type) {
        this.type = type;
    }

    public Months getOccurenceFrom() {
        return occurenceFrom;
    }

    public void setOccurenceFrom(Months occurenceFrom) {
        this.occurenceFrom = occurenceFrom;
    }

    public Months getOccurenceTo() {
        return occurenceTo;
    }

    public void setOccurenceTo(Months occurenceTo) {
        this.occurenceTo = occurenceTo;
    }

    public enum Months {

        JUNE, JULY, AUGUST, SEPTEMBER, OCTOBER
    }

    public enum MushroomType {

        EDIBLE, INEDIBLE, POISONOUS
    }

    @Override
    public String toString() {
        return name;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof MushroomDTO)) {
            return false;
        }
        MushroomDTO other = (MushroomDTO) object;
        if ((this.id == null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }
}
